<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<ul>
				<li v-for="item in list" :key="item.proId">
					<span>{{item.proName}}</span>
					-
					<span>{{item.price}}</span>
				</li>
			</ul>
		</div>
	</body>
	<script src="www/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
			
		const vm = new Vue({
		    el:"#app",
			data:{
				list:[]
			},
		    created() {
		        /*怀上了*/
		        // 数据请求
		        // console.log("实例创建之后")
				const url = "http://localhost:3000/api/pro/page?index=0&num=3"
				fetch(url).then(res=>{
					return res.json()
				}).then(data=>{
					console.log(data);
				})
		    }
		})
	</script>
</html>
